import { useEffect, useState } from 'react';
import RichText from '@/components/richText';
const App = () => {
  const [value, setValue] = useState('');
  useEffect(() => {
    console.log(value);
  }, [value]);
  return (
    <>
      <div
        style={{
          width: '520px',
          height: '350px',
          margin: '50px 50px',
          float: 'left',
        }}
      >
        <RichText value={value} setValue={setValue} />
      </div>
      <section
        style={{ margin: '50px' }}
        dangerouslySetInnerHTML={{ __html: value }}
      ></section>
    </>
  );
};
export default App;
